/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package horizon.space;

import horizon.entity.Entity;
import horizon.map.Chunk;
import horizon.map.Map;
import horizon.util.Vector2;
import java.util.ArrayList;
import java.util.HashMap;

public class Planet extends SpaceObject {

    Map m;
    public ArrayList<String> messages = new ArrayList<>();
  

    public Planet(Map m, Vector2 pos, String name) {
        super(pos, name);

        this.m = m;

    }

    public Map getM() {
        return m;
    }
    
    
    public boolean hasEntity(String s){
        
        if(m.getEntity(s) == null)
            return false;            
        else
            return true;
            
        
    }
    
    public Entity getEntity(String s){
        
        return m.getEntity(s);
        
    }
    
     public HashMap<Vector2, Chunk> getChunks() {
        HashMap<Vector2, Chunk> ret = new HashMap<Vector2, Chunk>();
        
        ret = m.getChunks();
        
        return ret;
    }
     
     public ArrayList<Entity> getEntities(){
         
         return new ArrayList<Entity>(m.getEntities().values());
         
     }
}